/*
 * @Description: 权限
 * @Author: Boide
 * @Date: 2022-01-27 17:11:14
 * @LastEditors: guiyi@hongyi.tech
 * @LastEditTime: 2022-02-17 17:18:27
 */
import http from '@/utils/request'

// 查询权限列表
export const permissionListPage = (data) => http.postJson('/permission/listPage', data)

// 新增权限
export const permissionSave = (data) => http.postJson('/permission/save', data)

// 修改权限
export const permissionUpdate = (data) => http.putJson('/permission/update', data)

// 根据id删除权限
export const permissionDeleteId = (id) => http.delete(`/permission/delete/${id}`)

// 批量删除权限
export const permissionDeleteBatch = (ids) => http.deleteJson(`/permission/deleteBatch`, ids)

// 获取权限信息
export const permissionGetId = (id) => http.get(`/permission/get/${id}`)

// 查询模块以及其对应的权限
export const permissionModulesAndPermissions = () => http.get('/permission/menusAndPermissions')

// 查新二级菜单列表
export const getSecondMenus = () => http.get('/menu/list2Level')
